Skip to content

chore: declare FunctionsToExport and add .gitattributes - #143

Merged
mikemadeja merged 1 commit into
developfrom
chore/manifest-and-gitattributes
Oct 12, 2026
Merged

mikemadeja merged 1 commit into
developfrom
chore/manifest-and-gitattributes

Conversation

@mikemadeja

Copy link
Copy Markdown
Owner

Summary

  • FunctionsToExport was missing from PiHoleShell.psd1 entirely, which PowerShell/the Gallery treat as wildcard ('*') - Microsoft's module authoring guidance explicitly calls this an anti-pattern: it forces PowerShell to execute the .psm1 to discover exports instead of reading the static manifest, and the Gallery can't show an accurate function list without importing. Added the explicit list, generated from and verified identical to PiHoleShell.psm1's own Export-ModuleMember list
  • Added .gitattributes (* text=auto, with PiHoleShell.psd1 excluded since it's UTF-16LE with a BOM) - makes line-ending normalization explicit/portable across contributors instead of implicit in each person's local core.autocrlf setting. Note: this does not silence the "LF will be replaced by CRLF" messages seen locally throughout development, since those come from this machine's own core.autocrlf=true, independent of .gitattributes - verified this directly rather than assume it

Test plan

  • Test-ModuleManifest confirms exactly 76 exported functions, matching the live module
  • Confirmed the manifest's new FunctionsToExport list is set-identical to PiHoleShell.psm1's Export-ModuleMember list (sorted comparison)
  • Real Import-Module .\PiHoleShell.psd1 (via the manifest, not the bare .psm1) succeeds and exposes all 76 functions correctly
  • Full non-integration unit suite passes (18/18)
  • .psd1 preserved as UTF-16LE with BOM (unchanged encoding) - confirmed via binary diff, not a text rewrite

🤖 Generated with Claude Code

FunctionsToExport was missing from the manifest entirely, which
PowerShell/the Gallery treat as wildcard ('*') - Microsoft's module
authoring guidance calls this an anti-pattern since it forces
PowerShell to execute the .psm1 to discover exports instead of
reading the static manifest, and the Gallery can't show an accurate
function list without importing. Added the explicit list, generated
from and verified identical to PiHoleShell.psm1's own
Export-ModuleMember list (76 functions, confirmed via
Test-ModuleManifest and a real Import-Module).

Also adds .gitattributes (* text=auto, with PiHoleShell.psd1
excluded since it's UTF-16LE). This makes line-ending normalization
explicit/portable across contributors rather than implicit in each
person's local core.autocrlf setting - note it does not by itself
silence the "LF will be replaced by CRLF" messages this session has
seen locally, since those come from this machine's own
core.autocrlf=true regardless of .gitattributes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@mikemadeja
mikemadeja merged commit 7ca07bf into develop Oct 12, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant